package com.nanhang.controller;

import com.nanhang.service.IBrandService;
import com.nanhang.client.Userclient;
import com.nanhang.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ym
 * @since 2025-01-13
 */
@RestController
@RequestMapping("/brand")
public class BrandController {
    @Autowired
    private IBrandService brandService;

    @Autowired
    private Userclient client;

    @GetMapping("/list")
    public R list(){
        return R.ok().data("res",brandService.list());
    }

    @GetMapping("/user/list")
    public R userList(){
        return R.ok().data("res",client.list());
    }
}
